package com.clear.club.circle.api.enums;

import lombok.Getter;

@Getter
public enum IsReadFlagEnum {

    READ(1, "已读"),
    UN_READ(2, "未读");

    private Integer code;
    private String desc;

    IsReadFlagEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsReadFlagEnum getByCode(int codeVal) {
        for (IsReadFlagEnum resultCodeEnum : IsReadFlagEnum.values()) {
            if (resultCodeEnum.code == codeVal) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}
